package com.gitee.wsl.logger

actual val platformLogPainter: LogPrinter
    get() = WebJsPrinter

object WebJsPrinter : LogPrinter {
    override fun log(level: LogLevel, tag: String, messageAny: Any?, throwable: Throwable?) {
        when (level) {
            LogLevel.VERBOSE -> console.log(messageAny)
            LogLevel.DEBUG -> console.log(messageAny)
            LogLevel.INFO -> console.info(messageAny)
            LogLevel.WARNING -> console.warn(messageAny)
            LogLevel.ERROR -> console.error(messageAny)
            LogLevel.WTF -> console.error(messageAny)
        }
    }
}